<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ taglib prefix="security"
	uri="http://www.springframework.org/security/tags"%>

<%-- <security:authorize access="isAuthenticated()"> --%>
<h1>Client Profile: ${user.login}</h1>

FirstName: ${user.firstname}
<br /></br>
LastName: ${user.lastname}
<br /></br>
Phone: ${user.phone}
<br /></br>
Email: ${user.email}
<br /></br>
Active: ${user.active}
<br /></br>
<%-- </security:authorize> --%>


<button class="btn btn-primary" data-toggle="modal"
	data-target="#myModal">Edit</button>
<div class="modal fade" id="myModal">
	<div class="modal-dialog" style="width: 350px;">

		<form method="post" action="home/edit">
			<div class="modal-content">
				<div class="modal-header">
					<button type="button" class="close" data-dismiss="modal">&times;</button>
					<h4 class="modal-title">Edit Profile</h4>
				</div>
				<div class="modal-body">
					<br /> <input type="text" class="form-control"
						value="<c:if test="${not empty user.firstname}">${user.firstname}</c:if>"
						name="firstname" placeholder='firstname' /> <br /> <input
						type="text" class="form-control"
						value="<c:if test="${not empty  user.lastname}"> ${user.lastname}</c:if>"
						name="lastname" placeholder='lastname' /> <br /> <input
						id="service_price" type="text" class="form-control"
						value="<c:if test="${not empty user.phone}">${user.phone}
			</c:if>"
						name="phone" placeholder='phone' /> <br /> <input type="text"
						class="form-control"
						value="<c:if test="${not empty user.email}">${user.email}</c:if>"
						name="email" placeholder='email' /> <br />
				</div>
				<div class="modal-footer">
					<button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
					<input type="submit" class="btn btn-primary" value="Save" />
				</div>
			</div>
		</form>
	</div>
	<!-- /.modal-content -->
</div>

<br /></br>
<br /></br>